event_inherited();
kd--;
if (instance_exists(o_Enemy)){
var enem = instance_nearest(x,y,o_Enemy);
if (kd<= 0 && instance_exists(o_Enemy)){
		if (point_distance(x, y, enem.x , enem.y )<250 && shoot_type == 0){
			if weapon_type1 = 0{shot( point_direction(x, y, enem.x , enem.y ));kd = 2*fullKd-sw_level*10;}
			if weapon_type1 = 1{shot( point_direction(x, y, enem.x , enem.y ));kd = 2*fullKd-sw_level*10;}
		}
		if (point_distance(x, y, enem.x , enem.y )<125 && shoot_type == 1)
		{
			if weapon_type2 = 0 {pircing(point_direction(x, y, enem.x , enem.y ), point_distance(x, y, enem.x , enem.y ),point_direction(enem.x , enem.y, x, y));kd = fullKd+50 - fw_level*10;}
			if weapon_type2 = 1 {}
		}
		if (point_distance(x, y, enem.x , enem.y )<125 && shoot_type == 2 )
		{
			if weapon_type3 = 0{fisting(point_direction(x, y, enem.x , enem.y ));kd =3*fullKd-tw_level*10;}
			if weapon_type3 = 1{boom(enem);kd =3*fullKd-tw_level*10;}
		}
	}
}
if (hp <= 0 || keyboard_check_pressed(ord("R"))) {scrLoad();}
